#ifndef _CINDEXMOVE_H
#define _CINDEXMOVE_H

#include "cv.h"
#include "highgui.h"

#include <vector>
using namespace std;

class CIndexMove
{
public:
	CIndexMove(void);
	~CIndexMove(void);

public:
	void MoveIndex(int nGestureType, IplImage *pSkinImg);
	void GetHandCenter(const IplImage *pSkinImg);

	static DWORD WINAPI MoveMouse(LPVOID param);

	int SetParams(int nWidth, int nHeight);

private:
	CvPoint m_currentPoint;
	CvPoint m_lastPoint;
	int m_nIndexThresh;
	int m_nTempDirection;
	int m_nMainDirection;
	int m_nWidth;
	int m_nHeight;
	int m_nCxScreen;
	int m_nCyScreen;
	float m_fRatio;


	bool m_decisionFlag;

	vector<CvPoint> m_pathVec;

	static bool m_moveFlag;
	int m_nIndexNum;
	int m_nStaticNum;
	static int xMark;
	static int yMark;
	static int pos;
	static HANDLE handle;
	static bool m_suspendFlag;
	static int m_nMoveStep;
	static HANDLE hEvent;
};

#endif
